package cn.zhangxh.org.service.impl;

import cn.zhangxh.base.service.impl.BaseServiceImpl;
import cn.zhangxh.org.domain.Product;
import cn.zhangxh.org.mapper.ProductMapper;
import cn.zhangxh.org.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @param :
 * @Author zxh
 * @Date: 2022/1/18$ 14:28$
 * @Version 1.0
 * @return :
 * @Description: ProductServiceImpl$
 */
@Service
/*事务配置,默认是readOnly = false*/
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class ProductServiceImpl extends BaseServiceImpl<Product> implements IProductService {

    @Autowired
    private ProductMapper productMapper;

    /**
     * @Date: 2022/1/22 23:14
     * @return :
     * @param : 前段拿来的所有的id
     * @Description : 批量阐述
     */
    @Override
    public void batchRemove(List<Long> id) {
        productMapper.batchRemove(id);
    }
}
